package net.aetherial.context.grounding.estimators;

/**
 * A simple estimator that returns the number of turns since the beginning of the conversation as a numerical estimate.
 */

public class TurnCountEstimator extends Estimator
{
	private double count;
	
	/**
	 * @see net.aetherial.context.grounding.estimators.Estimator#reset()
	 */
	
	public void reset ()
	{
		count = 0.0;
	}
	
	/**
	 * Constructor.
	 */
	
	public TurnCountEstimator ()
	{
		count = 0.0;
	}

	/**
	 * @see net.aetherial.context.grounding.estimators.Estimator#estimate(java.lang.String, java.lang.String, double)
	 */
	
	public double estimate (String sender, String contribution, double score) 
	{
		count += 1;
		
		return count;
	}

	/** 
	 * Returns "TurnCountEstimator".
	 * 
	 * @see net.aetherial.context.grounding.estimators.Estimator#getName()
	 */
	
	public String getName() 
	{
		return "TurnCountEstimator";
	}
}
